From ad2020e540ef7544525218f574e4e2a9ac072409 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 9 Apr 2009 19:07:41 +0000 Subject: [PATCH] Handle 24 bpp images in garmin_gpi if image width isn't a multiple of 4. Fix from anon sf user... git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3647 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/garmin_gpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gpsbabel/garmin_gpi.c b/gpsbabel/garmin_gpi.c index e2b9ec07f..2918dbf1f 100644 --- a/gpsbabel/garmin_gpi.c +++ b/gpsbabel/garmin_gpi.c @@ -1150,6 +1150,9 @@ load_bitmap_from_file(const char *fname, char **data, int *data_sz) le_write32(p, color); p += 4; } + for (j = (src_h.width * src_h.bpp) / 8; j < src_line_sz; j++) { + gbfgetc(f); /* drop fill-in bytes */ + } ptr -= dest_line_sz; } } -- 2.30.2